home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1996 #6 / Amiga Plus CD - 1996 - No. 06.iso / pd / netz / amitcphelperv1.20 / install < prev    next >
Text File  |  1996-06-29  |  5KB  |  202 lines

  1.  
  2. ; AmiTCPHelper Installer script by Neil Mohr
  3. ; $VER: AmiTCPHelper Installer 0.3 (01:18 9-June-96)
  4.  
  5. (complete 0)
  6.  
  7. (set #installOrNot
  8.   (askchoice
  9.     (prompt "Do you want to install or de-install AmiTCPHelper?")
  10.     (choices "Install AmiTCPHelper" "Remove AmiTCPHelper" "Remove but leave CanDO library")
  11.     (help @askchoice-help)
  12.   )
  13. )
  14.  
  15. (welcome)
  16. (set #oldUserLevel @user-level)
  17.  
  18. (user 2) ;don't start right
  19. (while (= (getassign "HOME") "")
  20.   (message "\n\n\nI cannot find the HOME: assign.\n\nThis is normally set when you start AmiTCP.\nMake sure you have started AmiTCP\nif not do so now, before proceeding\n\nIf AmiTCP has been started then you've got a problem.\n Abort and adjust your AmiTCP installation or something.")
  21. )
  22. (user #oldUserLevel)
  23.  
  24. (if (> #installOrNot 0)
  25.  (
  26.   (delete "AmiTCP:AmiTCPHelper"
  27.     (infos)
  28.     (prompt "Removing AmiTCPHelper")
  29.   )
  30.   (delete "HOME:.tracelist")
  31.   (delete "HOME:.fingerlist")
  32.   (delete "HOME:.pinglist")
  33.   (delete "HOME:.telnetlist")
  34.  
  35.   (if (= #installOrNot 1)
  36.     (delete "Libs:cando.library")
  37.   )
  38.  
  39.   (exit "\n\n\nWell, you asked for it, AmiTCPHelper on your machine is no more, it's your loss.")
  40.  )
  41. )
  42.  
  43. (set #destination 
  44.   (askdir 
  45.     (help @askdir-help)
  46.     (prompt "Where do you want AmiTCPHelper installed? No drawer will be made.")
  47.     (default "AmiTCP:")
  48.   )
  49. )
  50.  
  51. (set @default-dest #destination) ;got to do this if you abort before you get a shity error
  52.  
  53. (set #whichIcon
  54.   (askchoice
  55.     (prompt "Which type of icon do you want?")
  56.     (choices "groovy 8 colour thang" "standard 4 colour icon")
  57.     (help "The eight colour icon uses the MagicWB palette and is freely inspired by, or stolen from, if you prefer, Martin Huttenholer's superb MagicWB set of icons. The four colour version is still based upon the MagicWB theme, but with only half the colour.")
  58.   )
  59. )
  60.  
  61. (set #newnntpscript 1) ;copy it unless an expert say noooooo
  62.  
  63. (if (= #oldUserLevel 2)
  64.   (set #newnntpscript
  65.     (askbool
  66.       (prompt "Do you want the new NNTP transfer script?")
  67.       (help "The provided nntptransfer script has a couple of alterations to the one provided by DIS, namely paths for all the commands and an automatic retry if News is busy (thanks Tez (Tez@tezboyes.demon.co.uk)).")
  68.     )
  69.   )
  70. )
  71.  
  72. (complete 10)
  73.  
  74. (copyfiles
  75.   (prompt "Copying AmiTCPHelper")
  76.   (source "AmiTCPHelper")
  77.   (dest @default-dest)
  78.   (optional nofail)
  79.   (infos)
  80.   (noposition)
  81. )
  82.  
  83. (complete 30)
  84.  
  85. (if (exists "cando.library")
  86.   (
  87.     (copylib 
  88.       (prompt "Copying CanDo library")
  89.       (source "cando.library")
  90.       (dest "libs:")
  91.       (optional nofail)
  92.     )
  93.   )
  94. )
  95.  
  96. (complete 70)
  97.  
  98. ;mmm could do this with one procedure and pass argument names but
  99. ;it only works with the new installer and I can't be arsed so 
  100. ;looks like I'll do some cut and pasting
  101.  
  102. (if (exists "usr:lib/fings") 
  103.   (
  104.     (copyfiles
  105.       (prompt "moving old fings file")
  106.       (source "usr:lib/fings")
  107.       (dest "HOME:")
  108.       (newname ".fingerlist")
  109.     )
  110.     (delete "usr:lib/fings")
  111.   )
  112.   (
  113.     (copyfiles
  114.       (prompt "copy finger list to HOME:")
  115.       (source ".fingerlist")
  116.       (dest "HOME:")
  117.     )
  118.   )
  119. )
  120.  
  121.  
  122. (if (exists "usr:lib/clocks")
  123.   (
  124.     (copyfiles
  125.       (prompt "moving and renaming old clocks file")
  126.       (source "usr:lib/clocks")
  127.       (dest "HOME:")
  128.       (newname ".tracelist")
  129.     )
  130.     (delete "usr:lib/clocks")
  131.   )
  132.   (
  133.     (copyfiles
  134.       (prompt "copy trace list to HOME:")
  135.       (source ".tracelist")
  136.       (dest "HOME:")
  137.     )
  138.   )
  139. )
  140.  
  141.  
  142. (if (exists "usr:lib/pings") 
  143.   (
  144.     (copyfiles
  145.       (prompt "moving old ping file")
  146.       (source "usr:lib/pings")
  147.       (dest "HOME:")
  148.       (newname ".pinglist")
  149.     )
  150.     (delete "usr:lib/pings")
  151.   )
  152.   (
  153.     (copyfiles
  154.       (prompt "copy ping list to HOME:")
  155.       (source ".pinglist")
  156.       (dest "HOME:")
  157.     )
  158.   )
  159. )
  160.  
  161. (if (exists "usr:lib/telnets") 
  162.   (
  163.     (copyfiles
  164.       (prompt "moving old telnet file")
  165.       (source "usr:lib/telnets")
  166.       (dest "HOME:")
  167.       (newname ".telnetlist")
  168.     )
  169.     (delete "usr:lib/telnets")
  170.   )
  171.   (
  172.     (copyfiles
  173.       (prompt "copy telnet list to HOME:")
  174.       (source ".telnetlist")
  175.       (dest "HOME:")
  176.     )
  177.   )
  178. )
  179.  
  180. (complete 80)
  181.  
  182. (if (= 1 #whichIcon)
  183.   (copyfiles
  184.     (prompt "copying 4 colour icon")
  185.     (source "AmiTCPHelper.4colour.info")
  186.     (dest @default-dest)
  187.     (newname "AmiTCPHelper.info")
  188.   )
  189. )
  190.  
  191. (if (= #newnntpscript 1)
  192.   (copyfiles
  193.     (prompt "copying new nntp transfer script")
  194.     (source "nntptransfer")
  195.     (dest "AmiTCP:bin")
  196.   )
  197. )
  198.  
  199. (complete 100)
  200.  
  201. (exit "\n\n\nI hope you enjoy AmiTCPHelper. \n\nI'll enjoy it even more if you send me a tenner...")
  202.